package com.yang.provider.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yang.provider.manager.ProductManager;
import com.yang.provider.entity.Product;
import com.yang.provider.service.ProductService;
import com.yang.common.dto.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ProductServiceImpl
 */
@Slf4j
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductManager productManager;


    @Override
    public ResultVO<Integer> saveProduct(Product product) {
        return null;
    }

    @Override
    public ResultVO<Integer> delProduct(Integer productId) {
        return null;
    }

    @Override
    public ResultVO<List<Product>> listProducts(Product product) {
        return null;
    }

    @Override
    public ResultVO<Page<Product>> pageProducts(Product product) {
        return null;
    }

    @Override
    public ResultVO<Product> queryDetail(Long productId) {
        Product product = productManager.queryById(productId);
        return ResultVO.success(product);
    }

    @Override
    public ResultVO<Boolean> saveBatch(List<Product> productList) {
        boolean b = productManager.saveBatch(productList);
        return ResultVO.success(b);
    }
}
